<template>
    <el-dialog :model-value="true" title="Feed back" width="500" :close-on-click-modal="false" append-to-body @close="() => emits('close')">
        <el-form :model="form" label-width="auto" style="max-width: 600px">
            <el-form-item label="snum">
                <el-input v-model="props.itemData.snum" disabled/>
            </el-form-item>
            <el-form-item label="remark">
                <el-input type="textarea" v-model="form.remark"/>
            </el-form-item>
        </el-form>
        <template #footer>
            <div class="dialog-footer">
                <el-button @click="() => emits('close')">Cancel</el-button>
                <el-button type="primary" @click="onSubmit">
                    Confirm
                </el-button>
            </div>
        </template>
    </el-dialog>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import { defineProps, reactive, defineEmits } from 'vue'
const props = defineProps({ itemData: Object })
const form = reactive({
    remark:''
})

const emits = defineEmits(['close', 'success'])
const onSubmit = () => {
    if(!form.remark){
        ElMessage.error('please input remark')
        return
    }
}
</script>